<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="app">
        <input type="text" v-bind:placeholder="tips">
        <img v-bind:src="images">
        <!-- v-bind可以简写 -->
        <img :src="images">

        <hr />
        <!-- 和JS结合 -->
        <div>1 + 2 结果：{{1 + 2}}</div>
        <div>{{tips}}反转的结果是:{{tips.split('').reverse().join('')}}</div>
        <!-- 如果绑定的内容需要拼接，则字符串外面要包装单引号 -->
        <div :title="'box' + index">这是一个div</div>

    </div>
    <script src="./lib/vue.js"></script>
    <script>
        const vm = new Vue({
            el: '#app',
            data: {
                tips: '请输入用户名',
                images: 'https://lf3-cdn-tos.bytescm.com/obj/static/xitu_juejin_web/e08da34488b114bd4c665ba2fa520a31.svg',
                index: 3
            }
        })
    </script>
</body>

</html>